import { BaseTableState } from '#/core'
import {
  ClassifyItem,
  ClassifyType,
  ClassifyShow,
} from '@/api/premium/category/model/classifyModel'
import { OptionTagReq, TagItem } from '@/api/premium/content/model/tagModel'

export const noClassifyItem: ClassifyItem = {
  id: '-1',
  parentId: '0',
  name: '未分类标签',
  type: ClassifyType.IMAGE,
  isShow: ClassifyShow.SHOW,
  sort: 0,
  createTime: '',
  updateTime: '',
  addUser: '',
  modifyUser: '',
  pids: '0',
  level: 1,
}

export type TagTableState = BaseTableState<TagItem>

/**
 * 添加标签弹框相关类型
 */
export interface AddTagDiaFormData extends Omit<OptionTagReq, 'id'> {
  categoryIds: { label: string; value: string }[]
}
export interface AddTagDiaState {
  visiable: boolean
  formData: AddTagDiaFormData
}

/**
 * 编辑标签弹框相关类型
 */
export interface EditTagDiaFormData extends Omit<OptionTagReq, 'id'> {
  categoryIds: { label: string; value: string }[]
}
export interface EditTagDiaState {
  visiable: boolean
  currentTag?: TagItem
  formData: EditTagDiaFormData
}
